package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.store.awk.bean.ContentCardBean;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import o.cgz;
import o.chy;
import o.dge.d;
import o.dgh;
import o.dof;
import o.ContentManager;
import o.ewm.j;
import o.ewm.n;

public class TitleExtCard extends BaseDistCard {
    private LinearLayout ʼ;
    private ImageView ʽ;
    private TextView ˋ;

    public TitleExtCard(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (dof.ॱ(this.ˊᐝ.ॱॱ())) {
            this.ˋ.setVisibility(8);
            this.ʽ.setVisibility(4);
            this.ʽ.setEnabled(false);
            this.ʽ.setClickable(false);
            this.ʼ.setEnabled(false);
            this.ʼ.setClickable(false);
            return;
        }
        this.ˋ.setVisibility(0);
        if (!dof.ˋ(this.ˊᐝ.O_())) {
            this.ˋ.setText(this.ˊᐝ.O_());
        }
        this.ʽ.setVisibility(0);
        this.ʽ.setEnabled(true);
        this.ʽ.setClickable(true);
        this.ʼ.setEnabled(true);
        this.ʼ.setClickable(true);
    }

    public cgz ˏ(View view) {
        ॱ((TextView) view.findViewById(j.ʼﾞ));
        this.ˋ = (TextView) view.findViewById(j.ʽˈ);
        this.ʽ = (ImageView) view.findViewById(j.ʼꜞ);
        this.ʼ = (LinearLayout) view.findViewById(j.ॱꓹ);
        ʽ(view);
        return this;
    }

    public void ॱ(final chy o_chy) {
        OnClickListener anonymousClass1 = new OnClickListener(this) {
            final /* synthetic */ TitleExtCard ˋ;

            public void onClick(View view) {
                if (o_chy != null) {
                    o_chy.ˏ(0, this.ˋ);
                    BaseCardBean baseCardBean = (BaseCardBean) this.ˋ.ˌ();
                    if (baseCardBean instanceof ContentCardBean) {
                        int ˊ = ((ContentCardBean) baseCardBean).ˊ();
                        String ʽ = ((ContentCardBean) baseCardBean).ʽ();
                        dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ꜞ).ˏ(ˊ + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + ʽ).ˋ());
                    }
                }
            }
        };
        this.ˋ.setOnClickListener(anonymousClass1);
        this.ʽ.setOnClickListener(anonymousClass1);
        this.ʼ.setOnClickListener(anonymousClass1);
    }
}
